<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 事件处理 -->
    <div id="app">
        <button @click="c1">{{counter1}}</button>
        <button v-on:click.once ="c2">{{message2}}</button>
        <a href="http://www.163.com" target="_blank">不同的链接</a>
        <a @click.prevent  href="http://www.163.com" target="_blank">取消默认的行为</a>

    </div>
    <script>
        //创建Vue的对象
        let vm = new Vue({
            el:"#app",
            data:{
                message1:'hello',
                message2:'hello'
            },
            methods: {
                c1(){
                    this.meaasge1 = this.message1 +'vue!!!';
                },
                c2(){
                    this.message2 = this.message2 +' vue!!!!!!';
                }
            },
            
        })
    </script>

</body>
</html>